package com.jxw.launcher;

import android.content.Context;
import java.util.ArrayList;
import java.util.List;

/* loaded from: classes.dex */
public class BackListener {
    private static Context context;
    private static List<BackSureListener> listeners = new ArrayList();

    /* loaded from: classes.dex */
    public interface BackSureListener {
        void backSuccess(boolean z);
    }

    public BackListener(Context context2) {
        context = context2;
    }

    public void toSetBackListener(boolean z) {
        for (BackSureListener backSureListener : listeners) {
            if (backSureListener != null) {
                backSureListener.backSuccess(z);
            }
        }
    }

    public static void addBackListener(BackSureListener backSureListener) {
        listeners.add(backSureListener);
    }

    public static void removeBackListener(BackSureListener backSureListener) {
        listeners.remove(backSureListener);
    }
}
